<?php

namespace IDock\Insurance\JTIC\Request;

use IDock\Http\Request;
use IDock\Http\RequestFormat;
use IDock\Http\RequestMethod;
use IDock\Http\Response;

class AllJTICRequest extends Request
{

    protected $code;

    protected $method = RequestMethod::POST;

    protected $format = RequestFormat::RAW;

    public $curl = '';

    public $gateway;

    public function getCode()
    {
        return $this->code;
    }

    public function loadConfig(array $config): Request
    {
        $this->gateway = $config['gateway'] ?? '';

        $this->logsDir = $config['logsDir'] ?? '';

        $this->timeout = $config['timeout'] ?? '';

        $this->proxy = $config['proxy'] ?? '';

        $this->proxyPW = $config['proxyPW'] ?? '';

        $this->proxyAccount = $config['proxyAccount'] ?? '';

        return $this;
    }
}
